package entity

import (
	"shqsoft.cn/pas3ui/base"
)

type UserPermission struct {
	UserId           int    `gorm:"primary_key;column:UserId"`
	PermissionId     int    `gorm:"primary_key;column:PermissionId"`
	IsAllowCommision int    `gorm:"column:IsAllowCommision"`
	IsAllowProxy     int    `gorm:"column:IsAllowProxy"`
	PermissionType   string `gorm:"column:PermissionType"`
}

//TableName Role 角色表名
func (UserPermission) TableName() string {
	return "t_UserPermission"
}

func UserPermissionEF() base.EntityFunc {
	return func() interface{} {
		entity := UserPermission{}
		return &entity
	}
}
func UserPermissionESF() base.EntitiesFunc {
	return func() interface{} {
		var entities []UserPermission
		return &entities
	}
}

func init() {
	base.DaoPoolObj.Put("UserPermission", base.NewDefaultDao(UserPermissionEF(), UserPermissionESF(), nil, "my"))
}
